@extends('admin.layout.layout')
@section('title','类别修改')
                       

    
     @section('con')
        <div id="page-wrapper">
            <div class="row">
                <div ass="col-lg-12">
                    <h1 class="page-header">
                        
                    类别修改
                    


                    </h1>
                </div>
                <!-- /.col-lg-12 -->
            </div>
            <!-- /.row -->
            
            <div class="row">
                
                <div class="col-lg-12">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            类别修改
                        </div>
                        <div class="panel-body">
                            <div class="row">
                                <div class="col-lg-6 col-md-offset-3">
        
                                                      
                                    <form role="form" action='{{url("/admin/cate/doedit")}}' method='post' enctype='multipart/form-data'>
                                        
                                        <div  class="form-group" @if(!empty($res)) style='display:none'  @endif>
                                            <label>类别名</label>
                                            <select class="form-control"  name='pid'>
                                                <option value='0' >根类</option>
                                               
                                                 @foreach($cates as $k => $v)
                                                <option  @if($cate->pid==$v->tid) selected @endif value='{{$v->tid}}'>{{$v->tname}}</option>
                                                @endforeach
                                            </select>
                                        </div>
                                        
                                        <div class="form-group">
                                            <label>类别</label>
                                            <input class="form-control" type='text' name='tname' value='{{$cate->tname}}'>
                                           
                                        </div>
                                        
                                        
                                        

                                        {{csrf_field()}}
                                    
                                        
                                        <button class="btn btn-default" type="submit">修改</button>
                                        <button class="btn btn-default" type="reset">重置</button>
                                    </form>
                                </div>
                                <!-- /.col-lg-6 (nested) -->
                               
                                <!-- /.col-lg-6 (nested) -->
                            </div>
                            <!-- /.row (nested) -->
                        </div>
                        <!-- /.panel-body -->
                    </div>
                    <!-- /.panel -->
                </div>     
     
            </div>
          
            <!-- /.row -->
           
            <!-- /.row -->
        </div>
 @endsection